home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / PCCard.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  25.3 KB  |  670 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        PCCard.a
  3. ;
  4. ;    Contains:    PC Card Family Programming interface
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1996-1998 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__PCCARD__') = 'UNDEFINED' THEN
  18. __PCCARD__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  24.     include 'NameRegistry.a'
  25.     ENDIF
  26.  
  27.  
  28. kServiceCategoryPCCard            EQU        'pccd'
  29.  
  30. ; typedef UInt32                         PCCardEvent
  31.  
  32. ; typedef UInt32                         PCCardEventMask
  33.  
  34. ; typedef UInt32                         PCCardClientID
  35.  
  36. ; typedef UInt32                         PCCardTimerID
  37.  
  38. ; typedef UInt32                         PCCardSocket
  39.  
  40. ; typedef UInt32                         PCCardWindowID
  41.  
  42. ; typedef UInt32                         PCCardWindowType
  43.  
  44. ; typedef UInt32                         PCCardWindowSize
  45.  
  46. ; typedef UInt32                         PCCardWindowOffset
  47.  
  48. ; typedef UInt32                         PCCardWindowAlign
  49.  
  50. ; typedef OptionBits                     PCCardWindowState
  51.  
  52. ; typedef UInt32                         PCCardAccessSpeed
  53.  
  54. ; typedef UInt32                         PCCardWindowParam
  55.  
  56. ; typedef UInt32                         PCCardPage
  57.  
  58. ; typedef UInt32                         PCCardVoltage
  59.  
  60. ;    Several of the client notification bit flags have been REMOVED since the first
  61. ;    release of this header.  These were unused codes that were either
  62. ;    copied directly from PC Card 2.x, or from the PCMCIA standard.  In all cases,
  63. ;    they were completely unimplemented and would never be sent under PCCard 3.0.
  64. ;    
  65. ;    The removed flags are:
  66. ;        kPCCardClientInfoMessage, kPCCardSSUpdatedMessage,
  67. ;        and kPCCardFunctionInterruptMessage.
  68. ;    
  69. ;    If your software used any of these flags, you should delete any references
  70. ;    to them.  These event codes are being recycled for new features.
  71. ;
  72.  
  73. ;  Client notification bit flags 
  74.  
  75. kPCCardNullMessage                EQU        $00000000            ; no messages pending (not sent to clients)
  76. kPCCardInsertionMessage            EQU        $00000001            ; card has been inserted into the socket
  77. kPCCardRemovalMessage            EQU        $00000002            ; card has been removed from the socket- do not touch hardware!
  78.                                                             ; Lock and Unlock may be used for a hardware locking card-cage. 
  79. kPCCardLockMessage                EQU        $00000004            ; card is locked into the socket with a mechanical latch 
  80. kPCCardUnlockMessage            EQU        $00000008            ; card is no longer locked into the socket 
  81.                                                             ; Ready and Reset are holdovers from PC Card 2.x, but someone might be using them (!?) 
  82. kPCCardReadyMessage                EQU        $00000010            ; card is ready to be accessed -- do not use! this event is never sent! (use kPCCardInsertion instead) 
  83. kPCCardResetMessage                EQU        $00000020            ; physical reset has completed -- do not use! this event is never sent! (use kPCCardResetComplete instead) 
  84.                                                             ; InsertionRequest and InsertionComplete may be used with certain cages (??) 
  85. kPCCardInsertionRequestMessage    EQU        $00000040            ; request to insert a card using insertion motor 
  86. kPCCardInsertionCompleteMessage    EQU        $00000080            ; insertion motor has finished inserting a card 
  87. kPCCardEjectionRequestMessage    EQU        $00000100            ; user or other client is requesting a card ejection
  88. kPCCardEjectionCompleteMessage    EQU        $00000200            ; card ejection succeeded- do not touch hardware! 
  89. kPCCardEjectionFailedMessage    EQU        $00000400            ; eject failure due to electrical/mechanical problems
  90. kPCCardPMResumeMessage            EQU        $00000800            ; power management resume 
  91. kPCCardPMSuspendMessage            EQU        $00001000            ; power management suspend 
  92. kPCCardPMSuspendRequest            EQU        $00002000            ; power management sleep request 
  93. kPCCardPMSuspendRevoke            EQU        $00004000            ; power management sleep revoke 
  94. kPCCardResetPhysicalMessage        EQU        $00008000            ; physical reset is about to occur on this card -- this event is never sent! 
  95. kPCCardResetRequestMessage        EQU        $00010000            ; physical reset has been requested by a client
  96. kPCCardResetCompleteMessage        EQU        $00020000            ; ResetCard() background reset has completed
  97. kPCCardBatteryDeadMessage        EQU        $00040000            ; battery is no longer useable, data will be lost
  98. kPCCardBatteryLowMessage        EQU        $00080000            ; battery is weak and should be replaced
  99. kPCCardWriteProtectMessage        EQU        $00100000            ; card is now write protected
  100. kPCCardWriteEnabledMessage        EQU        $00200000            ; card is now write enabled
  101. kPCCardUnexpectedRemovalMessage    EQU        $02000000            ; card has unexpectedly been manually ejected -- careful, this event occurs at hardware interrupt time 
  102.                                                             ; Unconfigured is a (currently unused) holdover from PC Card 2.x 
  103. kPCCardUnconfiguredMessage        EQU        $04000000            ; a CARD_READY was delivered to all clients and no client 
  104.                                                             ;    requested a configuration for the socket -- this event is never sent under PCCard 3.0! 
  105. kPCCardStatusChangedMessage        EQU        $08000000            ; status change for cards in I/O mode
  106. kPCCardTimerExpiredMessage        EQU        $10000000            ; message sent when requested time has expired 
  107. kPCCardRequestAttentionMessage    EQU        $20000000
  108. kPCCardEraseCompleteMessage        EQU        $40000000
  109. kPCCardRegistrationCompleteMessage EQU    $80000000            ; notifications available only in PCCard 3.1 and later 
  110. kPCCardPMEnabledMessage            EQU        $00800000            ; power management has been enabled by the user; if appropriate, clients should call PCCardSetPowerLevel(off) 
  111. ; typedef OptionBits                     PCCardWindowAttributes
  112.  
  113. ;     window state (values of PCCardWindowAttributes) 
  114.  
  115. kWSCommon                        EQU        $0001                ; common memory window 
  116. kWSAttribute                    EQU        $0002                ; attribute memory window
  117. kWSIO                            EQU        $0004                ; I/O window
  118. kWSCardBus                        EQU        $0800                ; CardBus bridge window 
  119. kWSTypeMask                        EQU        $0807                ; window type mask
  120. kWSEnabled                        EQU        $0008                ; window enabled
  121. kWS8bit                            EQU        $0010                ; 8-bit data width window
  122. kWS16bit                        EQU        $0020                ; 16-bit data width window
  123. kWS32bit                        EQU        $0040                ; 32-bit data width window
  124. kWSAutoSize                        EQU        $0080                ; auto-size data width window
  125. kWSWidthMask                    EQU        $00F0                ; window data width mask
  126. kWSProtected                    EQU        $0100                ; window write protected
  127. kWSPrefetchable                    EQU        $0200                ; bridge window prefetchable
  128. kWSPageShared                    EQU        $0400                ; page register is shared
  129. kWSWindowSizeOffset                EQU        $4000
  130. kWSChangeAccessSpeed            EQU        $8000                ; Used by CSModifyWindow only 
  131. ;  window speed (sample values of PCCardAccessSpeed) for use in PCCardRequestWindow  
  132.  
  133. kAccessSpeed600ns                EQU        $006A
  134. kAccessSpeed500ns                EQU        $005A
  135. kAccessSpeed400ns                EQU        $004A
  136. kAccessSpeed300ns                EQU        $003A
  137. kAccessSpeed250ns                EQU        $0001
  138. kAccessSpeed200ns                EQU        $0002
  139. kAccessSpeed150ns                EQU        $0003
  140. kAccessSpeed100ns                EQU        $0004
  141. ; typedef UInt32                         PCCardInterfaceType
  142.  
  143. ;  InterfaceType bit-mask (values of PCCardInterfaceType) 
  144.  
  145. kIFTypeMask                        EQU        $03                    ; IO & memory type mask
  146. kIFCardBus                        EQU        $00                    ; if bits 0 & 1 are zero then cardbus interface
  147. kIFMemory                        EQU        $01                    ; if bit 0 set memory IF
  148. kIFIO                            EQU        $02                    ; if bit 1 set IO IF
  149. kIFReserved                        EQU        $03                    ; bits 0 and 1 set is reserved 
  150. kIFDMA                            EQU        $08                    ; if bit 3 set DMA supported
  151. kIFVSKey                        EQU        $10                    ; if bit 4 set supports low Voltage key
  152. kIF33VCC                        EQU        $20                    ; if bit 5 set socket suports 3.3v
  153. kIFXXVCC                        EQU        $40                    ; if bit 6 set socket supports X.X voltage
  154. kIFYYVCC                        EQU        $80                    ; if bit 7 set socket supports Y.Y voltage
  155. ; typedef UInt32                         PCCardCustomInterfaceID
  156.  
  157. ;  Custom Interface Identifiers (values of PCCardCustomInterfaceID) 
  158.  
  159. kIFCustom_None                    EQU        $00                    ; no custom interface ID 
  160. kIFCustom_ZOOM                    EQU        $41                    ; ZOOM Video Mode custom interface identifier 
  161. ; typedef OptionBits                     PCCardConfigOptions
  162.  
  163. ;  Bit mask values for PCCardConfigOptions in the configuration calls 
  164.  
  165. kEnableIRQSteering                EQU        $0002
  166. kIRQChangeValid                    EQU        $0004
  167. kVppChangeValid                    EQU        $0010
  168. kEnableDMAChannel                EQU        $0040
  169. kDMAChangeValid                    EQU        $0080
  170. kVSOverride                        EQU        $0200                ; Bits 10..31 reserved 
  171.  
  172. ;   Configuration Registers Presence Mask for the FCR
  173. ;   Used by PCCardConfigPresentMask
  174.  
  175.  
  176.  
  177. kConfigOptionPresent            EQU        $00000001
  178. kConfigStatusPresent            EQU        $00000002
  179. kPinReplacePresent                EQU        $00000004
  180. kSocketCopyPresent                EQU        $00000008
  181. kExtendedStatusPresent            EQU        $00000010
  182. kIOBase0Present                    EQU        $00000020
  183. kIOBase1Present                    EQU        $00000040
  184. kIOBase2Present                    EQU        $00000080
  185. kIOBase3Present                    EQU        $00000100
  186. kIOLimitPresent                    EQU        $00000200
  187. ; typedef UInt32                         PCCardConfigPresentMask
  188.  
  189. ; typedef UInt32                         PCCardConfigRegisterIndex
  190.  
  191. ; typedef UInt32                         PCCardConfigRegisterOffset
  192.  
  193. PCCardFunctionConfigReg    RECORD 0
  194. configOptionReg             ds.b    1                ; offset: $0 (0)
  195. configStatusReg             ds.b    1                ; offset: $1 (1)
  196. pinReplaceReg             ds.b    1                ; offset: $2 (2)
  197. socketCopyReg             ds.b    1                ; offset: $3 (3)
  198. extendedStatusReg         ds.b    1                ; offset: $4 (4)
  199. ioBase0                     ds.b    1                ; offset: $5 (5)
  200. ioBase1                     ds.b    1                ; offset: $6 (6)
  201. ioBase2                     ds.b    1                ; offset: $7 (7)
  202. ioBase3                     ds.b    1                ; offset: $8 (8)
  203. ioLimit                     ds.b    1                ; offset: $9 (9)
  204. sizeof                     EQU *                    ; size:   $A (10)
  205.                         ENDR
  206. ; typedef OptionBits                     PCCardSocketStatus
  207.  
  208. ;     general socket status bits (values of PCCardSocketStatus) 
  209.  
  210. kSTBatteryDead                    EQU        $0001                ; battery dead
  211. kSTBatteryLow                    EQU        $0002                ; battery low
  212. kSTBatteryGood                    EQU        $0004                ; battery good
  213. kSTPower                        EQU        $0008                ; power is applied
  214. kST16bit                        EQU        $0010                ; 16-bit PC Card present
  215. kSTCardBus                        EQU        $0020                ; CardBus PC Card present
  216. kSTMemoryCard                    EQU        $0040                ; memory card present
  217. kSTIOCard                        EQU        $0080                ; I/O card present
  218. kSTNotACard                        EQU        $0100                ; unrecognizable PC Card detected
  219. kSTReady                        EQU        $0200                ; ready
  220. kSTWriteProtect                    EQU        $0400                ; card is write-protected
  221. kSTDataLost                        EQU        $0800                ; data may have been lost due to card removal
  222. kSTRingIndicate                    EQU        $1000                ; ring indicator is active
  223. kSTReserved                        EQU        $E000
  224. ;  Bit mask for PCCardPowerOptions in the power management calls 
  225. ; typedef OptionBits                     PCCardPowerOptions
  226.  
  227.  
  228. kPCCardPowerOn                    EQU        $00000001
  229. kPCCardPowerOff                    EQU        $00000002
  230. kPCCardLowPower                    EQU        $00000004
  231. ; typedef OptionBits                     PCCardAdapterCapabilities
  232.  
  233. ; typedef UInt32                         PCCardAdapterPowerState
  234.  
  235. ; typedef OptionBits                     PCCardSCEvents
  236.  
  237. ; typedef UInt32                         PCCardWindow
  238.  
  239. ; typedef UInt32                         PCCardIRQ
  240.  
  241. ; typedef UInt32                         PCCardDMA
  242.  
  243. ;  Selectors for PCCardGetGlobalOptions 
  244. ;     The type of the "value" parameter is provided for each selector. 
  245. ; typedef UInt32                         PCCardOptionSelector
  246.  
  247.  
  248. kPCCardPowerManagementAttrib    EQU        1                    ; value = (Boolean*) enabled  
  249.  
  250.  
  251. ;  Types and structures for accessing the PCCard Assigned-Address property.
  252.  
  253.  
  254. kPCCardNonRelocatableSpace        EQU        $80
  255. kPCCardPrefetchableSpace        EQU        $40
  256. kPCCard16BitSpace                EQU        $20
  257. kPCCardAddressTypeCodeMask        EQU        $07
  258. kPCCardConfigSpace                EQU        0
  259. kPCCardIOSpace                    EQU        1
  260. kPCCardMemorySpace                EQU        2
  261. kPCCardAttributeMemorySpace        EQU        4
  262. ; typedef UInt8                         PCCardAddressSpaceFlags
  263.  
  264.  
  265. kPCCardSocketNumberMask            EQU        $F8
  266. kPCCardFunctionNumberMask        EQU        $07
  267. ; typedef UInt8                         PCCardSocketFunction
  268.  
  269. ; typedef UInt8                         PCCardBusNumber
  270.  
  271. ; typedef UInt8                         PCCardRegisterNumber
  272.  
  273.  
  274. ;   note: this structure is similar, but not the same as the PCIAssignedAddress structure
  275. ;         16-bit cards use this structure, CardBus cards use PCIAssignedAddress
  276.  
  277.  
  278. PCCardAssignedAddress    RECORD 0
  279. addressSpaceFlags         ds.b    1                ; offset: $0 (0)
  280. reserved                 ds.b    1                ; offset: $1 (1)
  281. socketFunctionNumber     ds.b    1                ; offset: $2 (2)
  282. registerNumber             ds.b    1                ; offset: $3 (3)
  283. address                     ds.l    1                ; offset: $4 (4)
  284. size                     ds.l    1                ; offset: $8 (8)
  285. sizeof                     EQU *                    ; size:   $C (12)
  286.                         ENDR
  287. ; typedef struct PCCardAssignedAddress * PCCardAssignedAddressPtr
  288.  
  289. ; ----------------------------------------------------------------------
  290. ;    Client Support
  291. ;----------------------------------------------------------------------
  292.  
  293. ;  Prototype for client callback 
  294. ;
  295. ; extern OSStatus PCCardRegisterClient(const RegEntryID *deviceRef, PCCardEventMask eventMask, PCCardEventHandler clientCallBack, void *clientParam, PCCardClientID *newClientID)
  296. ;
  297.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  298.         IMPORT_CFM_FUNCTION PCCardRegisterClient
  299.     ENDIF
  300.  
  301. ;
  302. ; extern OSStatus PCCardDeRegisterClient(PCCardClientID theClientID)
  303. ;
  304.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  305.         IMPORT_CFM_FUNCTION PCCardDeRegisterClient
  306.     ENDIF
  307.  
  308. ;
  309. ; extern OSStatus PCCardRegisterTimer(PCCardClientID registeredClientID, PCCardTimerID *lpNewTimerID, long delay)
  310. ;
  311.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  312.         IMPORT_CFM_FUNCTION PCCardRegisterTimer
  313.     ENDIF
  314.  
  315. ;
  316. ; extern void PCCardDeRegisterTimer(PCCardTimerID timerID)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  319.         IMPORT_CFM_FUNCTION PCCardDeRegisterTimer
  320.     ENDIF
  321.  
  322. ;
  323. ; extern OSStatus PCCardSetEventMask(PCCardClientID theClientID, PCCardEventMask newEventMask)
  324. ;
  325.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  326.         IMPORT_CFM_FUNCTION PCCardSetEventMask
  327.     ENDIF
  328.  
  329. ;
  330. ; extern OSStatus PCCardGetEventMask(PCCardClientID theClientID, PCCardEventMask *newEventMask)
  331. ;
  332.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  333.         IMPORT_CFM_FUNCTION PCCardGetEventMask
  334.     ENDIF
  335.  
  336. ;
  337. ; extern OSStatus PCCardGetCardServicesInfo(ItemCount *socketCount, UInt32 *complianceLevel, UInt32 *version)
  338. ;
  339.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  340.         IMPORT_CFM_FUNCTION PCCardGetCardServicesInfo
  341.     ENDIF
  342.  
  343. ;
  344. ; extern OSStatus PCCardGetSocketRef(PCCardSocket vSocket, RegEntryID *socketRef)
  345. ;
  346.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  347.         IMPORT_CFM_FUNCTION PCCardGetSocketRef
  348.     ENDIF
  349.  
  350. ;
  351. ; extern OSStatus PCCardGetCardRef(PCCardSocket vSocket, RegEntryID *cardRef)
  352. ;
  353.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  354.         IMPORT_CFM_FUNCTION PCCardGetCardRef
  355.     ENDIF
  356.  
  357. ;
  358. ; extern OSStatus PCCardGetDeviceRef(PCCardSocket vSocket, UInt32 device, RegEntryID *deviceRef)
  359. ;
  360.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  361.         IMPORT_CFM_FUNCTION PCCardGetDeviceRef
  362.     ENDIF
  363.  
  364. ;
  365. ; extern OSStatus PCCardGetSocketAndDeviceFromDeviceRef(const RegEntryID *deviceRef, PCCardSocket *vSocket, UInt32 *device)
  366. ;
  367.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  368.         IMPORT_CFM_FUNCTION PCCardGetSocketAndDeviceFromDeviceRef
  369.     ENDIF
  370.  
  371. ;
  372. ; extern OSStatus PCCardGetCardRefFromDeviceRef(const RegEntryID *deviceRef, RegEntryID *cardRef)
  373. ;
  374.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION PCCardGetCardRefFromDeviceRef
  376.     ENDIF
  377.  
  378.  
  379. ; ----------------------------------------------------------------------
  380. ;    Resource Management
  381. ;----------------------------------------------------------------------
  382.  
  383. ;
  384. ; extern OSStatus PCCardRequestWindow(const RegEntryID *deviceRef, PCCardWindowAttributes windowAttributes, LogicalAddress *windowBase, ByteCount *windowSize, PCCardAccessSpeed *windowSpeed, PCCardWindowOffset *windowOffset, PCCardWindowID *windowID)
  385. ;
  386.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  387.         IMPORT_CFM_FUNCTION PCCardRequestWindow
  388.     ENDIF
  389.  
  390. ;
  391. ; extern OSStatus PCCardModifyWindow(PCCardWindowID windowID, PCCardWindowAttributes windowAttributes, PCCardAccessSpeed windowSpeed, PCCardWindowOffset windowOffset)
  392. ;
  393.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  394.         IMPORT_CFM_FUNCTION PCCardModifyWindow
  395.     ENDIF
  396.  
  397. ;
  398. ; extern OSStatus PCCardReleaseWindow(PCCardWindowID windowID)
  399. ;
  400.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  401.         IMPORT_CFM_FUNCTION PCCardReleaseWindow
  402.     ENDIF
  403.  
  404. ;
  405. ; extern OSStatus PCCardInquireWindow(const RegEntryID *deviceRef, PCCardWindowID windowID, PCCardWindowAttributes *windowAttributes, LogicalAddress *windowBase, ByteCount *windowSize, PCCardAccessSpeed *windowSpeed, PCCardWindowOffset *windowOffset)
  406. ;
  407.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  408.         IMPORT_CFM_FUNCTION PCCardInquireWindow
  409.     ENDIF
  410.  
  411. ;
  412. ; extern OSStatus PCCardGetStatus(const RegEntryID *deviceRef, UInt32 *currentState, UInt32 *changedState, PCCardVoltage *Vcc, PCCardVoltage *Vpp)
  413. ;
  414.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION PCCardGetStatus
  416.     ENDIF
  417.  
  418. ;
  419. ; extern OSStatus PCCardRequestConfiguration(const RegEntryID *deviceRef, PCCardConfigOptions configOptions, PCCardInterfaceType ifType, PCCardCustomInterfaceID ifCustomType, PCCardVoltage vcc, PCCardVoltage vpp, LogicalAddress configRegistersBase, PCCardConfigPresentMask configRegistersPresent, PCCardFunctionConfigReg *configRegisterValues)
  420. ;
  421.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION PCCardRequestConfiguration
  423.     ENDIF
  424.  
  425. ;
  426. ; extern OSStatus PCCardReleaseConfiguration(const RegEntryID *deviceRef)
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION PCCardReleaseConfiguration
  430.     ENDIF
  431.  
  432. ;
  433. ; extern OSStatus PCCardModifyConfiguration(const RegEntryID *deviceRef, PCCardConfigOptions configOptions, PCCardVoltage vpp)
  434. ;
  435.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  436.         IMPORT_CFM_FUNCTION PCCardModifyConfiguration
  437.     ENDIF
  438.  
  439. ;
  440. ; extern OSStatus PCCardReadConfigurationRegister(const RegEntryID *deviceRef, PCCardConfigRegisterIndex whichRegister, PCCardConfigRegisterOffset offset, UInt8 *value)
  441. ;
  442.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  443.         IMPORT_CFM_FUNCTION PCCardReadConfigurationRegister
  444.     ENDIF
  445.  
  446. ;
  447. ; extern OSStatus PCCardWriteConfigurationRegister(const RegEntryID *deviceRef, PCCardConfigRegisterIndex whichRegister, PCCardConfigRegisterOffset offset, UInt8 value)
  448. ;
  449.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  450.         IMPORT_CFM_FUNCTION PCCardWriteConfigurationRegister
  451.     ENDIF
  452.  
  453. ;
  454. ; extern OSStatus PCCardResetFunction(const RegEntryID *deviceRef)
  455. ;
  456.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  457.         IMPORT_CFM_FUNCTION PCCardResetFunction
  458.     ENDIF
  459.  
  460. ; ----------------------------------------------------------------------
  461. ;    Client Utilities
  462. ;----------------------------------------------------------------------
  463.  
  464. ; typedef UInt8                         PCCardTupleKind
  465.  
  466.  
  467.  
  468. ;
  469. ; extern PCCardTupleIterator PCCardNewTupleIterator(void )
  470. ;
  471.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  472.         IMPORT_CFM_FUNCTION PCCardNewTupleIterator
  473.     ENDIF
  474.  
  475. ;
  476. ; extern OSStatus PCCardDisposeTupleIterator(PCCardTupleIterator tupleIterator)
  477. ;
  478.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION PCCardDisposeTupleIterator
  480.     ENDIF
  481.  
  482. ;
  483. ; extern OSStatus PCCardGetFirstTuple(const RegEntryID *deviceID, PCCardTupleKind desiredTuple, PCCardTupleIterator tupleIterator, void *dataBuffer, UInt32 *dataBufferSize, PCCardTupleKind *foundTuple, UInt32 *foundTupleDataSize)
  484. ;
  485.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  486.         IMPORT_CFM_FUNCTION PCCardGetFirstTuple
  487.     ENDIF
  488.  
  489. ;
  490. ; extern OSStatus PCCardGetNextTuple(const RegEntryID *deviceRef, PCCardTupleKind desiredTuple, PCCardTupleIterator tupleIterator, void *dataBuffer, UInt32 *dataBufferSize, PCCardTupleKind *foundTuple, UInt32 *foundTupleDataSize)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION PCCardGetNextTuple
  494.     ENDIF
  495.  
  496. ; ----------------------------------------------------------------------
  497. ;    Miscellaneous
  498. ;----------------------------------------------------------------------
  499.  
  500. ;
  501. ; extern OSStatus PCCardEject(const RegEntryID *cardRef)
  502. ;
  503.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION PCCardEject
  505.     ENDIF
  506.  
  507. ;
  508. ; extern OSStatus PCCardEnableModemSound(const RegEntryID *cardRef, Boolean enableSound)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  511.         IMPORT_CFM_FUNCTION PCCardEnableModemSound
  512.     ENDIF
  513.  
  514. ;
  515. ; extern OSStatus PCCardEnableZoomedVideoSound(const RegEntryID *cardRef, Boolean enableSound)
  516. ;
  517.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  518.         IMPORT_CFM_FUNCTION PCCardEnableZoomedVideoSound
  519.     ENDIF
  520.  
  521. ;
  522. ; extern OSStatus PCCardSetPowerLevel(const RegEntryID *deviceRef, PCCardPowerOptions powerLevel)
  523. ;
  524.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  525.         IMPORT_CFM_FUNCTION PCCardSetPowerLevel
  526.     ENDIF
  527.  
  528. ;
  529. ; extern OSStatus PCCardSetRingIndicate(const RegEntryID *deviceRef, Boolean setRingIndicate)
  530. ;
  531.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  532.         IMPORT_CFM_FUNCTION PCCardSetRingIndicate
  533.     ENDIF
  534.  
  535. ;
  536. ; extern OSStatus PCCardGetGlobalOptions(PCCardOptionSelector selector, void *value)
  537. ;
  538.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  539.         IMPORT_CFM_FUNCTION PCCardGetGlobalOptions
  540.     ENDIF
  541.  
  542. ; typedef UInt32                         PCCardDevType
  543.  
  544. ; typedef UInt32                         PCCardSubType
  545.  
  546. ;  values for PCCardType and PCCardSubType
  547.  
  548. kPCCardUnknownType                EQU        0
  549. kPCCardMultiFunctionType        EQU        1
  550. kPCCardMemoryType                EQU        2
  551. kPCCardNullSubType                EQU        0                    ; Memory sub types 
  552. kPCCardRomSubType                EQU        1
  553. kPCCardOTPromSubType            EQU        2
  554. kPCCardEpromSubType                EQU        3
  555. kPCCardEEpromSubType            EQU        4
  556. kPCCardFlashSubType                EQU        5
  557. kPCCardSramSubType                EQU        6
  558. kPCCardDramSubType                EQU        7
  559. kPCCardSerialPortType            EQU        3
  560. kPCCardSerialOnlySubType        EQU        0
  561. kPCCardDataModemSubType            EQU        1
  562. kPCCardFaxModemSubType            EQU        2
  563. kPCCardFaxAndDataModemMask        EQU        3
  564. kPCCardVoiceEncodingSubType        EQU        4
  565. kPCCardParallelPortType            EQU        4
  566. kPCCardFixedDiskType            EQU        5
  567. kPCCardUnknownFixedDiskType        EQU        0
  568. kPCCardATAInterfaceDiskSubType    EQU        1
  569. kPCCardRotatingDeviceSubType    EQU        $00
  570. kPCCardSiliconDevice            EQU        $80
  571. kPCCardVideoAdaptorType            EQU        6
  572. kPCCardNetworkAdaptorType        EQU        7
  573. kPCCardArcNetSubType            EQU        1                    ; network sub types 
  574. kPCCardEthernetSubType            EQU        2
  575. kPCCardTokenRingSubType            EQU        3
  576. kPCCardLocalTalkSubType            EQU        4
  577. kPCCardFDDI_CDDISubType            EQU        5
  578. kPCCardATMSubType                EQU        6
  579. kPCCardWirelessSubType            EQU        7
  580. kPCCardAIMSType                    EQU        8
  581. kPCCardSCSIType                    EQU        9
  582. kPCCardSerialBusType            EQU        10
  583. kPCCardUSBBusSubType            EQU        1
  584. kPCCardFirewireBusSubType        EQU        2
  585. ;
  586. ; extern OSStatus PCCardGetCardInfo(const RegEntryID *cardRef, PCCardDevType *cardType, PCCardSubType *cardSubType, StringPtr cardName, StringPtr vendorName)
  587. ;
  588.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  589.         IMPORT_CFM_FUNCTION PCCardGetCardInfo
  590.     ENDIF
  591.  
  592.  
  593. kPCCard16HardwareType            EQU        'pc16'
  594. kCardBusHardwareType            EQU        'cdbs'
  595. ; typedef UInt32                         PCCardHardwareType
  596.  
  597. ;
  598. ; extern OSStatus PCCardGetCardType(const RegEntryID *socketRef, PCCardHardwareType *cardType)
  599. ;
  600.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  601.         IMPORT_CFM_FUNCTION PCCardGetCardType
  602.     ENDIF
  603.  
  604. ;  error codes 
  605.  
  606. kBadAdapterErr                    EQU        -9050                ; invalid adapter number
  607. kBadAttributeErr                EQU        -9051                ; specified attributes field value is invalid
  608. kBadBaseErr                        EQU        -9052                ; specified base system memory address is invalid
  609. kBadEDCErr                        EQU        -9053                ; specified EDC generator specified is invalid
  610. kBadIRQErr                        EQU        -9054                ; specified IRQ level is invalid
  611. kBadOffsetErr                    EQU        -9055                ; specified PC card memory array offset is invalid
  612. kBadPageErr                        EQU        -9056                ; specified page is invalid
  613. kBadSizeErr                        EQU        -9057                ; specified size is invalid
  614. kBadSocketErr                    EQU        -9058                ; specified logical or physical socket number is invalid
  615. kBadTypeErr                        EQU        -9059                ; specified window or interface type is invalid
  616. kBadVccErr                        EQU        -9060                ; specified Vcc power level index is invalid
  617. kBadVppErr                        EQU        -9061                ; specified Vpp1 or Vpp2 power level index is invalid
  618. kBadWindowErr                    EQU        -9062                ; specified window is invalid
  619. kBadArgLengthErr                EQU        -9063                ; ArgLength argument is invalid
  620. kBadArgsErr                        EQU        -9064                ; values in argument packet are invalid
  621. kBadHandleErr                    EQU        -9065                ; clientHandle is invalid
  622. kBadCISErr                        EQU        -9066                ; CIS on card is invalid
  623. kBadSpeedErr                    EQU        -9067                ; specified speed is unavailable
  624. kReadFailureErr                    EQU        -9068                ; unable to complete read request
  625. kWriteFailureErr                EQU        -9069                ; unable to complete write request
  626. kGeneralFailureErr                EQU        -9070                ; an undefined error has occurred
  627. kNoCardErr                        EQU        -9071                ; no PC card in the socket
  628. kUnsupportedFunctionErr            EQU        -9072                ; function is not supported by this implementation
  629. kUnsupportedModeErr                EQU        -9073                ; mode is not supported
  630. kBusyErr                        EQU        -9074                ; unable to process request at this time - try later
  631. kWriteProtectedErr                EQU        -9075                ; media is write-protected
  632. kConfigurationLockedErr            EQU        -9076                ; a configuration has already been locked
  633. kInUseErr                        EQU        -9077                ; requested resource is being used by a client
  634. kNoMoreItemsErr                    EQU        -9078                ; there are no more of the requested item
  635. kOutOfResourceErr                EQU        -9079                ; Card Services has exhausted the resource
  636. kNoCardSevicesSocketsErr        EQU        -9080
  637. kInvalidRegEntryErr                EQU        -9081
  638. kBadLinkErr                        EQU        -9082
  639. kBadDeviceErr                    EQU        -9083
  640. k16BitCardErr                    EQU        -9084
  641. kCardBusCardErr                    EQU        -9085
  642. kPassCallToChainErr                EQU        -9086
  643. kCantConfigureCardErr            EQU        -9087
  644. kPostCardEventErr                EQU        -9088                ; _PCCSLPostCardEvent failed and dropped an event 
  645. kInvalidDeviceNumber            EQU        -9089
  646. kUnsupportedVsErr                EQU        -9090                ; Unsupported Voltage Sense 
  647. kInvalidCSClientErr                EQU        -9091                ; Card Services ClientID is not registered 
  648. kBadTupleDataErr                EQU        -9092                ; Data in tuple is invalid 
  649. kBadCustomIFIDErr                EQU        -9093                ; Custom interface ID is invalid 
  650. kNoIOWindowRequestedErr            EQU        -9094                ; Request I/O window before calling configuration 
  651. kNoMoreTimerClientsErr            EQU        -9095                ; All timer callbacks are in use 
  652. kNoMoreInterruptSlotsErr        EQU        -9096                ; All internal Interrupt slots are in use 
  653. kNoClientTableErr                EQU        -9097                ; The client table has not be initialized yet 
  654. kUnsupportedCardErr                EQU        -9098                ; Card not supported by generic enabler
  655. kNoCardEnablersFoundErr            EQU        -9099                ; No Enablers were found
  656. kNoEnablerForCardErr            EQU        -9100                ; No Enablers were found that can support the card
  657. kNoCompatibleNameErr            EQU        -9101                ; There is no compatible driver name for this device
  658. kClientRequestDenied            EQU        -9102                ; CS Clients should return this code inorder to 
  659.                                                             ;   deny a request-type CS Event                
  660. kNotReadyErr                    EQU        -9103                ; PC Card failed to go ready 
  661. kTooManyIOWindowsErr            EQU        -9104                ; device requested more than one I/O window 
  662. kAlreadySavedStateErr            EQU        -9105                ; The state has been saved on previous call 
  663. kAttemptDupCardEntryErr            EQU        -9106                ; The Enabler was asked to create a duplicate card entry 
  664. kCardPowerOffErr                EQU        -9107                ; Power to the card has been turned off 
  665. kNotZVCapableErr                EQU        -9108                ; This socket does not support Zoomed Video 
  666. kNoCardBusCISErr                EQU        -9109                ; No valid CIS exists for this CardBus card 
  667.     ENDIF ; __PCCARD__ 
  668.  
  669.